/******************************************************************************
 Copyright (c) 2022-2025 Qualcomm Technologies International, Ltd.
 All Rights Reserved.
 Qualcomm Technologies International, Ltd. Confidential and Proprietary.

 REVISION:      $Revision: #14 $
******************************************************************************/

#ifndef GATT_XPAN_SERVER_ACCESS_H
#define GATT_XPAN_SERVER_ACCESS_H

#include "csr_synergy.h"

#ifndef EXCLUDE_GATT_XPAN_SERVER_MODULE

#include "gatt_xpan_server_common.h"
#include "gatt_xpan_server.h"

/***************************************************************************
NAME
    xpanServerHandleAccessReadIndication

DESCRIPTION
    Handle the characteristic read indication's that are sent
    to the XPAN Server library.
*/
void xpanServerHandleAccessReadIndication(
        GattXpanServerData *gattXpanServerInstance,
        CsrBtGattDbAccessReadInd *const access_ind);

/***************************************************************************
NAME
    xpanServerHandleAccessWriteIndication

DESCRIPTION
    Handle the characteristic read indication's that are sent
    to the XPAN Server library.
*/
void xpanServerHandleAccessWriteIndication(
        GattXpanServerData *gattXpanServerInstance,
        CsrBtGattDbAccessWriteInd *const access_ind);

/***************************************************************************
NAME
    xpanServerHandleReadIndCcc

DESCRIPTION
    Handle the reads to characteristic client configuration indications
    that were sent to the XPAN Server library.
*/
void xpanServerHandleReadIndCcc(
        GattXpanServerData *gattXpanServerInstance,
         CsrBtGattDbAccessReadInd *const accessInd);

/***************************************************************************
NAME
    xpanServerHandleReadClientConfigAccess

DESCRIPTION
    Handle the access to read characteristic indications that were sent
    to the XPAN Server library.
*/
void xpanServerHandleReadClientConfigAccess(
        CsrBtGattId task,
        ConnectionId cid,
        uint16 handle,
        const uint16 clientConfig);

/****************************************************************
 NAME
      xpanServerHandleTwtConfigurationAccess
 
 DESCRIPTION
      Deals with access of the HANDLE_TWT_CONFIGURATION handle.
*/
void xpanServerHandleTwtConfigurationAccess(
        GattXpanServerData *gattXpanServerInstance,
        CsrBtGattDbAccessWriteInd *const accessInd);

/****************************************************************
 NAME
      xpanServerHandleClearToSendRead
 
 DESCRIPTION
      Deals with read access of the HANDLE_CLEAR_TO_SEND handle.
*/
void xpanServerHandleClearToSendRead(
        GattXpanServerData *gattXpanServerInstance,
        CsrBtGattDbAccessReadInd *const accessInd);

/****************************************************************
 NAME
      xpanServerConnectSsidHandle

 DESCRIPTION
      Deals with write of Connect Ssid to the control point.
*/
uint8 xpanServerConnectSsidHandle(GattXpanServerData *gattXpanServerInstance,
                                  GattAccessWriteIndIterator *accessIndIter);

/****************************************************************
 NAME
      xpanServerConnectedSsidHandle

 DESCRIPTION
      Deals with write of Connected Ssid to the control point.
*/
uint8 xpanServerConnectedSsidHandle(GattXpanServerData *gattXpanServerInstance,
                                    GattAccessWriteIndIterator *accessIndIter);

/****************************************************************
 NAME
      xpanServerAvailableSsidHandle

 DESCRIPTION
      Deals with write of Available Ssid to the control point.
*/
uint8 xpanServerAvailableSsidHandle(GattXpanServerData *gattXpanServerInstance,
                                    GattAccessWriteIndIterator *accessIndIter);

/****************************************************************
 NAME
      xpanServerRelatedSsidsHandle

 DESCRIPTION
      Deals with write of Related Ssid to the control point.
*/
uint8 xpanServerRelatedSsidsHandle(GattXpanServerData *gattXpanServerInstance,
                                   GattAccessWriteIndIterator *accessIndIter);

/****************************************************************
 NAME
      xpanServerConnectedEnterpriseSsidHandle

 DESCRIPTION
      Deals with write of Connected Enterprise Ssid to the control point.
*/
uint8 xpanServerConnectedEnterpriseSsidHandle(GattXpanServerData *gattXpanServerInstance,
                                                  GattAccessWriteIndIterator *accessIndIter);

/****************************************************************
 NAME
      xpanServerHandleXpanControlPointWrite
 
 DESCRIPTION
      Deals with write access of the HANDLE_XPAN_CONTROL_POINT handle.
*/
void xpanServerHandleXpanControlPointWrite(
        GattXpanServerData *gattXpanServerInstance,
        CsrBtGattDbAccessWriteInd *const accessInd);

/****************************************************************
 * NAME
 *      xpanServerHandleAudioBearerSwitchResponseRead
 *
 * DESCRIPTION
 *      Deals with access of the HANDLE_AUDIO_BEARER_SWITCH_RESPONSE handle.
 * **************************************************************/
void xpanServerHandleAudioBearerSwitchResponseRead(
        GattXpanServerData *gattXpanServerInstance,
        CsrBtGattDbAccessReadInd *const accessInd);

#endif  /* EXCLUDE_GATT_XPAN_SERVER_MODULE */

#endif /* GATT_XPAN_SERVER_ACCESS_H */

